<?php 
include_once "../../../lib/import.php";

$window = new WBAppWindow(array(
	'title' => 'This is App Window',
	'x' => 'center',
	'y' => 'center',
	'width' => 500,
	'height' => 500,
	'layout' => 'hbox'
));

$panel = $window->add(array(
	'layout' => 'button',
	'height' => 30
));

$button = $panel->add(array(
	'wbtype' => 'PushButton',
	'caption' => 'Open Modal',
    'event' => array(
       'click' => 'testFunc'
  )
));

$window->visible = true;

wbstart();

function testFunc($eo) { 
    $modal = new WBModalessDialog(array(
	    'parent' => $eo->window(),
		'title' => 'This is Modaless Dialog',
		'x' => 'center',           
		'y' => 'center',           
		'width' => 300,
		'height' => 300,    
	));
    
    $modal->visible = true;
}

?>
